/*
 *  vectordelete.cpp
 *  
 *
 *  Created by Daniel Condon on 20/09/12.
 *  Copyright 2012 __MyCompanyName__. All rights reserved.
 *
 */
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <time.h>
#include <math.h>
#include <vector>


using namespace std;

class bleep {
public:
	int a;
};

class holder{
public:
	bleep* qq;
	
	holder(){
		qq = new bleep;
		qq->a = rand()%50+1;
	}
	
	~holder(){
		delete qq;
	}
};

int main(int argv, char* argc){
	srand(time(NULL));
	vector<holder*> nums;
	for (int i = 0; i < 10; i++) {
		holder* temp = new holder();
		nums.push_back(temp);
	}
	
	for (int i = 0; i < nums.size(); i++) {
		delete nums.at(i);
	}
	nums.erase(nums.begin(), nums.end());
	
	return 0;
}